<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" isELIgnored="false"%>
    
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Merchants information</title>
<style type="text/css">
	 .bar {
	background-color: #2894FF;
	width: 100%;
	height: 30px;
	margin-top: 25px;
	
}

  a {text-decoration: none; }
  
  #title{color: white; }
  
  #info {
    color: #000000;
}
	#info:hover {
    color: #2894FF;
}
  
  

</style>


</head>
<body>


	<!-- 抬头内容 -->
	<div class="bar">
		<table width="90%" height="30%" cellpadding="0" cellspacing="0" style="table-layout:fixed;margin-top: 15px;padding-top: 5px;" align="center" >
		<tr>
			<td width="30" align="center"><a href="#" id="title">所有商家信息</a></td>
		
		</tr>
		</table>
	</div>
	<div>
	
	</div>


	<!-- 表格内容 -->
	<table style="margin-top: 30px" width="70%" border="1" cellpadding="0" cellspacing="0" style="table-layout:fix" align="center">
		<tr>
			<td width="45" align="center">序号</td>
			<td width="45" align="center">商家名字</td>
			<td width="45" align="center">商家地址</td>
			<td width="45" align="center">头像</td>
		</tr>
		<c:forEach var="merchant" items="${merchantVOs }" varStatus="status">
			<tr>
				<c:if test="${status.count%2==0}" >
	              <tr style="background: #A9A9A9">
	           </c:if>
	           <c:if test="${status.count%2!=0}" >
	              <tr>
	           </c:if>
	           <td>${status.index +1} </td>
				<td align="center">	
					<a href="showFoodByUname?uname=${merchant.uname }" id="info">${merchant.uname }</a>
				</td>
				<td align="center">${merchant.address }</td>
				<td align="center"><img width="100" height="100" alt=${merchant.headImg } src=${merchant.headImg }></td>
				
				
			</tr>
		</c:forEach>
	</table>
</body>
</html>